#include<iostream>

using namespace std;

class Base
{
private:
	void func_pri();
protected:
	void func_pro();
public:
	void func_pub();
	friend void function(Base*);
};
void Base::func_pri()
{
	cout << "private" << endl;
}
void Base::func_pro()
{
	cout << "protected" << endl;
}
void Base::func_pub()
{
	this->func_pri();
	cout << "public" << endl;
}
void function(Base* base)
{
	base->func_pri();
}

int main()
{
	Base* base;
	base = new Base;
	base->func_pub();
	delete base;
	return 0;
}